import React, { Component } from 'react';

class formEvent extends Component {
    handleText = (e) => {
        // console.log(e.target.attributes.data.value)
        console.log(e)
        console.log(e.target.dataset.animates)
    }
    handleCheck=(e) => {
        console.log(e.target.checked)
    }
    handleFile=(e) => {
        // files类型为FileList
        // lastModified: 1603177967588 最后修改文件的时间戳
        console.log(e.target.files[0])
    }
    handleSelect=(e) => {
        // select上就算没有value同样能取到最终选项的值
        console.log(e)
        console.log(e.target.value)
    }
    render() {
        return (
            <div className="formclassfiy">
                <input data-animate="6666" data-animates="13444" onChange={this.handleText} type="text" />
                <input onChange={this.handleCheck} type="checkbox" />
                <input onChange={this.handleFile} type="file" name="" id="" />
                <select name="" id="" onChange={this.handleSelect} value="">
                    <option value="🐖">🐖</option>
                    <option value="🐕">🐕</option>
                    <option value="🐂">🐂</option>
                    <option value="🦌">🦌</option>
                </select>
            </div>
        );
    }
}

export default formEvent;